﻿<UserControl x:Class="ARViewFinder.Controls.OverlayItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:controls="clr-namespace:ARViewFinder.Controls"
             mc:Ignorable="d"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             d:DesignHeight="110" d:DesignWidth="250"
             DataContext="{Binding}">

    <UserControl.Resources>
        <controls:ReadableDistanceConverter x:Key="ReadableDistanceConverter" />
    </UserControl.Resources>
    
    <StackPanel Orientation="Vertical">
        
        <TextBlock Text="{Binding Title}" 
                   TextWrapping="Wrap"
                   Style="{StaticResource PhoneTextLargeStyle}"  
                       Foreground="White"/>
        
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding Subtitle}" 
                       Style="{StaticResource PhoneTextSmallStyle}" 
                       Foreground="White"
                       />

            <TextBlock Text="{Binding Distance, Converter={StaticResource ReadableDistanceConverter}}" 
                       Style="{StaticResource PhoneTextSmallStyle}" 
                       Foreground="White"/>
        
        </StackPanel>

    </StackPanel>
</UserControl>
